import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
// import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import Particles from 'particles.vue3'
import locale from 'element-plus/es/locale/lang/zh-cn' //element-plus中文
import './assets/css/reset.css' //重置样式
import dayjs from 'dayjs'
import 'amfe-flexible/index'
// ① 引入createPinia方法从pinia
import { createPinia } from 'pinia'
// 数据持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// ② 拿到pinia实例
const pinia = createPinia()
const app = createApp(App)

pinia.use(piniaPluginPersistedstate)

// app.use(store)
app.use(router)
app.use(Particles)
app.use(pinia)
app.use(ElementPlus, { locale })

app.mount('#app')
app.config.globalProperties.day = dayjs //全局挂载
